#include "project.h"

#include <iomanip>
#include <sstream>

TimeManager& TimeManager::getInstance() {
    static TimeManager instance;
    return instance;
}

std::string TimeManager::getCurrentTime() {
    auto now = std::chrono::system_clock::now();
    std::time_t now_c = std::chrono::system_clock::to_time_t(now);
    std::tm* local_tm = std::localtime(&now_c);

    std::ostringstream oss;
    oss << std::setfill('0') << std::setw(2) << local_tm->tm_hour << ":"
        << std::setfill('0') << std::setw(2) << local_tm->tm_min << ":"
        << std::setfill('0') << std::setw(2) << local_tm->tm_sec;
    return oss.str();
}